﻿<Window
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	x:Class="SVPageTest"
	x:Name="Window"
	Title="SVPageTest"
	Width="575" Height="480" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" Background="#FF000000" xmlns:Wpf_Controls="clr-namespace:Wpf.Controls;assembly=Wpf.TabControl">

	<Window.Resources>
		<LinearGradientBrush x:Key="ToolbarBGBrush" EndPoint="0.5,1" StartPoint="0.5,0">
			<GradientStop Color="#FF969696" Offset="0"/>
			<GradientStop Color="#FFA6A6A6" Offset="1"/>
		</LinearGradientBrush>
		<Style x:Key="TabControlClose" TargetType="{x:Type TabControl}">
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="{x:Type TabControl}">
						<Grid KeyboardNavigation.TabNavigation="Local">
							<Grid.RowDefinitions>
								<RowDefinition Height="Auto"/>
								<RowDefinition Height="*"/>
							</Grid.RowDefinitions>
						
							<TabPanel Grid.Row="0" Margin="0,0,26,0" x:Name="HeaderPanel" Background="Transparent" IsItemsHost="True" Panel.ZIndex="1" KeyboardNavigation.TabIndex="1" Height="21.96" VerticalAlignment="Top" d:LayoutOverrides="VerticalAlignment" RenderTransformOrigin="0.5,0.5">
								<TabPanel.RenderTransform>
									<TransformGroup>
										<ScaleTransform ScaleX="1" ScaleY="1"/>
										<SkewTransform AngleX="0" AngleY="0"/>
										<RotateTransform Angle="0"/>
										<TranslateTransform X="0" Y="0"/>
									</TransformGroup>
								</TabPanel.RenderTransform>
							</TabPanel>
						
							<Border Grid.Row="1" x:Name="Border" Background="{DynamicResource ToolbarBGBrush}" BorderBrush="#FFFFCF01" BorderThickness="1" CornerRadius="2" KeyboardNavigation.DirectionalNavigation="Contained" KeyboardNavigation.TabNavigation="Local" KeyboardNavigation.TabIndex="2" Margin="0,-4,0,0">
							
								<!-- The implementation switches the content. This control must be named PART_SelectedContentHost -->
								<ContentPresenter Margin="4" x:Name="PART_SelectedContentHost" ContentSource="SelectedContent"/>
							
							</Border>
							<Button HorizontalAlignment="Right" Margin="0,1,5,7" Style="{DynamicResource SimpleButton}" VerticalAlignment="Stretch" Width="16.623" Content="X" d:LayoutOverrides="Height" x:Name="CTabButton" Click="CTabButton_Click" Foreground="#FFFFFFFF" BorderThickness="1,1,1,1"/>
						</Grid>					
						<ControlTemplate.Triggers>
							<Trigger Property="IsEnabled" Value="False">
								<Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}"/>
								<Setter Property="BorderBrush" Value="#FFFFCF01" TargetName="Border"/>
							</Trigger>
						</ControlTemplate.Triggers>
				
					</ControlTemplate>
				</Setter.Value>
			</Setter>
			<Setter Property="Background" Value="#FF535353"/>
			<Setter Property="Foreground" Value="#FFFFFFFF"/>
		</Style>
	</Window.Resources>

	<Grid x:Name="LayoutRoot" Opacity="1">
		<Wpf_Controls:TabControl Margin="1,2,6,10" IsSynchronizedWithCurrentItem="True" Background="{x:Null}" BorderBrush="#FFFFC901" TabItemMouseOverBackground="#FFD3D3D3" TabItemNormalBackground="#FF525252" TabItemSelectedBackground="#FF6E6E6E" x:Name="newTC"/>
		<TabControl IsSynchronizedWithCurrentItem="True" Margin="0,46.25,2,-34" x:Name="ChatTabs1" Style="{DynamicResource TabControlClose}" Background="#FFFFF8F8" d:IsHidden="True"/>
	</Grid>
</Window>